/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "song_artists")
//@NamedQueries({@NamedQuery(name = "SongArtists.findAll", query = "SELECT s FROM SongArtists s"), @NamedQuery(name = "SongArtists.findByArtistId", query = "SELECT s FROM SongArtists s WHERE s.artistId = :artistId"), @NamedQuery(name = "SongArtists.findByName", query = "SELECT s FROM SongArtists s WHERE s.name = :name"), @NamedQuery(name = "SongArtists.findByPriority", query = "SELECT s FROM SongArtists s WHERE s.priority = :priority"), @NamedQuery(name = "SongArtists.findByVolatile1", query = "SELECT s FROM SongArtists s WHERE s.volatile1 = :volatile1")})
public class SongArtists implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "artistId")
    private Integer artistId;
    @Column(name = "name")
    private String name;
    @Basic(optional = false)
    @Column(name = "priority")
    private int priority;
    @Basic(optional = false)
    @Column(name = "volatile")
    private char volatile1;

    public SongArtists() {
    }

    public SongArtists(Integer artistId) {
        this.artistId = artistId;
    }

    public SongArtists(Integer artistId, int priority, char volatile1) {
        this.artistId = artistId;
        this.priority = priority;
        this.volatile1 = volatile1;
    }

    public Integer getArtistId() {
        return artistId;
    }

    public void setArtistId(Integer artistId) {
        this.artistId = artistId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public char getVolatile1() {
        return volatile1;
    }

    public void setVolatile1(char volatile1) {
        this.volatile1 = volatile1;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (artistId != null ? artistId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SongArtists)) {
            return false;
        }
        SongArtists other = (SongArtists) object;
        if ((this.artistId == null && other.artistId != null) || (this.artistId != null && !this.artistId.equals(other.artistId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.SongArtists[artistId=" + artistId + "]";
    }

}
